<template>
  子组件<br>
  <button v-on:click="count++">
      您单击了 {{ count }} 次.
  </button>
</template>

<script>
import { reactive, toRefs } from '@vue/reactivity'
export default {
    setup () {
        const state = reactive({
            count: 0
        })

        return {
            ...toRefs(state)
        }
    }
}
</script>

<style>

</style>